Skip to content

Latest commit

 

History

History
99 lines (84 loc) · 1.85 KB

File metadata and controls

99 lines (84 loc) · 1.85 KB

import { HttpStatusCode } from 'solid-start/server'; import { Description, Property, Qwik, SolidPreactOrReact, Title, } from '~/components';

<Title>zodForm$</Title> Creates a validation functions that parses the Zod schema of a form.

zodForm$

Creates a validation functions that parses the Zod schema of a form.

const validate = zodForm$(schema);

Parameters

  • schema <Property {...properties.schema} />

Return

  • validate <Property {...properties.validate} />

This page is exclusively for the Qwik library of Modular Forms.

export const properties = { schema: { type: { type: 'custom', name: 'MaybeFunction', href: '../MaybeFunction', generics: [ { type: 'custom', name: 'ZodType', generics: [ 'any', 'any', { type: 'custom', name: 'FieldValues', href: '../FieldValues', }, ], }, ], }, }, validate: { type: { custom: 'custom', name: 'QRL', generics: [ { type: 'function', params: [ { name: 'values', type: { type: 'custom', name: 'PartialValues', href: '../PartialValues', generics: [ { type: 'custom', name: 'FieldValues', href: '../FieldValues', }, ], }, }, ], return: { type: 'custom', name: 'FormErrors', href: '../FormErrors', }, }, ], }, }, };